export interface ICoupon {
  id: string;
  createTime: string;
  name: string;
  effectiveType: number;
  effectiveDays: number;
  startTime: string;
  endTime: string;
  couponType: number;
  productType: number;
  discount: number;
  discountAmount: number;
  conditionAmount: number;
  issueQuantity: number;
  limitQuantity: number;
  useStatus: number;
  status: number;
  couponProducts: IProcuct[] | null;
  canUse?: boolean;
}

export interface IAdress {
  tenantId: string;
  createTime: string;
  updateTime: string;
  deleted: boolean;
  id: string;
  userName: string;
  phone: string;
  postCode: string;
  // 是否为默认地址 0-非默认 1-默认
  isDefault: number;
  province: string;
  city: string;
  county: string;
  detailInfo: string;
  userId: string;
  location: string;
  lngLat: string;
}

export interface Ipoint {
  type: number;
  name: string;
  lineId: string;
  lineName: string;
  communityId: string;
  communityName: string;
  provinceId: string;
  provinceName: string;
  cityId: string;
  cityName: string;
  districtId: string;
  districtName: string;
  lngLat: string;
  author: string;
  phone: string;
  address: string;
  pointId: string;
  img: string[];
  range: number;
  baseMoney: number;
  shippingMoney: number;
  freeMoney: number;
  pointUserId: string;
}

export interface IProcuct {
  // 配送方式
  distributionMode: 0 | 1;
  productId: string;
  productPic: string;
  productName: string;
  productSn: string;
  productPrice: number;
  productOriginalPrice: number;
  productQuantity: number;
  productSkuId: string;
  productSkuCode: any;
  productSkuPic: string;
  specs: string;
  status: number;
  giftIntegration: number;
  memberType: number;
  rebateType: number;
  memberPrices: Array<{
    id: string;
    productId: string;
    skuId: string;
    memberLevelId: string;
    memberType: any;
    memberPrice: number;
    memberLevelName: string;
  }>;
  skuRebates: Array<{
    id: number;
    productId: number;
    rebatePrice: number;
    skuId: number;
  }>;
}

export interface IFullScale {
  id: string;
  name: string;
  startTime: number;
  endTime: number;
  deductionType: string;
  applyType: string;
  productType: number;
  status: number;
  fullScaleProducts: Array<{
    id: string;
    fullScaleId: string;
    productId: string;
  }>;
  fullScaleRules: Array<{
    id: string;
    fullScaleId: string;
    ruleType: number;
    discount: number;
    discountAmount: number;
    conditionAmount: number;
  }>;
}

export interface IFull {
  fullScaleId: number;
  price: number;
  /** 是否和会员价共用 */
  canUseMemberPrice: boolean;
  /** 是否和积分共用 */
  useIntegral: boolean;
}

/** 会员数据 */
export interface IMember {
  id: string;
  memberCardInfoId: string;
  memberCardPrivileges: Array<{
    // 是否允许删除 0-不允许 1-允许
    allowDel: string;
    // 创建时间
    createTime: string;
    // 默认值(可以是折扣值或者其他值,目前只有p_type=1时代表未添加为权益商品的商品的默认值)
    defValue: number;
    // 删除状态：0->未删除；1->已删除
    icon: string;
    // 权益图标
    id: number;
    // 权益说明
    illustrate: number;
    // 是否有多个权益值选择 0-否 1-是
    isRule: number;
    // 特权开关 0-关闭 1-开启
    open: number;
    // 权益名称
    privilegeName: number;
    // 权益类型
    ptype: string;
    updateTime: number;
  }>;
  supplyBonus: number;
  memberExpireTime: string;
  memberNumber: string;
  memberRegisterTime: string;
  openType: number;
  openValue: number;
  /** 会员等级ID */
  rankCode: string;
  rankName: string;
  state: number;
  title: string;
  useInDate: string;
  rebateType: number;
}

export interface IRebateSet {
  tenantId: string;
  createTime: string;
  updateTime: string;
  deleted: boolean;
  id: string;
  shopId: string;
  rebateRatio: number;
  balanceUseCondition: string;
  rebateCondition: string;
}
